<%@page import="day1.Student"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<!-- HTML Comment -->
	<%-- JSP Comment --%>
	<%! public final static String salutation = "Hello Class"; %>
	<% String name = request.getParameter("name"); %>
	<%=salutation + " " + name %>
	<%--
		out.println("<br/>");
		Student student = (Student)request.getAttribute("std");
		out.println(student.getName());
		out.println(student.getNickname());
	--%>
	
	<%--
	<jsp:useBean id="std" class="day1.Student"></jsp:useBean>
	<jsp:getProperty property="name" name="std"/><br/>
	<jsp:getProperty property="nickname" name="std"/>
	--%>
	<%--
	<br/>
	Name : ${std.name }<br/>
	Nick Name : ${std.nickname }<br/>
	<br/>
	This is from session.<br/>
	Name : ${obj.name }<br/>
	Nick Name : ${obj.nickname }
	--%>
	<table border="1">
		<tr>
			<th>
				Name
			</th>
			<th>
				Nick Name
			</th>
		</tr>
		<c:forEach items="${slist }" var="student">
			<tr>
				<td>
					${student.name }
				</td>
				<td>
					<c:url var="loadid" value="/list/${student.nickname }">
						<c:param name="name" value="${student.name }"></c:param>
						<c:param name="nick" value="${student.nickname }"></c:param>
					</c:url>
					<a href="${loadid }">${student.nickname }</a>
				</td>
			</tr>
		</c:forEach>
	</table>
	<form method="post">
		<input type="submit" value="Submit"/>
	</form>
</body>
</html>